public class Test {
    public static void main(String[] args) {
        CPU cpu = new CPU() ;
        cpu.speed = 2200;
        HardDisk disk = new HardDisk();
        disk.amount = 200 ;
        PC pc = new PC();
        pc.setCPU(cpu);
        pc.setHardDisk(disk);
        pc.show();
    }

        }

 class PC {
    CPU cpu ;
    HardDisk HD ;

    public void setCPU(CPU cpu) {
        this.cpu = cpu;
    }

    public void setHardDisk(HardDisk HD) {
        this.HD = HD;
    }
    public void show(){
        System.out.println(cpu.speed);
        System.out.println(HD.amount);
    }
}
class CPU{
    int speed ;

    public int getSpeed() {
        return speed;
    }

    public void setSpeed(int speed) {
        this.speed = speed;
    }
}
class  HardDisk{
   int amount;

    public int getAmount() {
        return amount;
    }

    public void setAmount(int amount) {
        this.amount = amount;
    }
}
